home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
tools
/
filer
/
rexx
/
upload.filer
< prev
next >
Wrap
Text File
|
1995-03-09
|
1KB
|
79 lines
/*
$VER: Upload.filer 1.0 (22.11.93)
Author:
Matthias Scheler (tron@lyssa.pb.owl.de)
Function:
All selected files in the active directory listview will be uploaded
via Olaf `Olsen' Barthel's Term
Requires:
Term 3.4 or newer up and running
Call:
Upload
Example for "Filer.RC":
BUTTON ...,...,"Upload","Upload"
*/
ADDRESS 'FilerRexx'
OPTIONS RESULTS
IF ~SHOW('Ports','TERM') THEN
DO
ALERTBOX 'Term is not running.'
EXIT 5
END
GETSOURCEPATH
IF RESULT="RESULT" THEN EXIT 5
SourceDir=RESULT
LOCKFILER
IF RESULT="RESULT" THEN EXIT 5
Key=Result
PANEL OFF
'STATUS Preparing upload via Term ...'
ADDRESS 'TERM' 'CLEAR UPLOAD'
DoIt=0
GETNUMENTRIES
Num=RESULT
DO Index=1 TO Num
GETNAME Index
Data=RESULT
Name=SUBSTR(Data,2)
IF LEFT(Data,1)="f" THEN
DO
IF RIGHT(SourceDir,1)=":" THEN SourceName=SourceDir||Name
ELSE SourceName=SourceDir||"/"||Name
ADDRESS 'TERM' 'ADDITEM TO upload NAME '||SourceName
TOGGLEENTRY Index
DoIt=1
END
END
IF DoIt THEN
DO
'STATUS Uploading via Term ...'
ADDRESS 'TERM' 'WINDOW main FRONT ACTIVATE'
ADDRESS 'TERM' 'SENDFILE MODE Binary'
END
'STATUS Operation finished !'
PANEL ON
UNLOCKFILER Key